import {request} from "../../request/index.js";

Page({
  data:{
    swiperList:[],
    catesList:[],
    floorList:[]
  },
  onLoad(options){
    this.getSwiperList()
    this.getCateList()
    this.getFloorList()

  },
  //获取轮播图数据
  getSwiperList(){
     request({ url: "/home/swiperdata" })
     .then(result =>{
         this.setData({
          swiperList:result
          })
        })
  },
    //导航
    getCateList(){
      request({ url: "/home/catitems" })
      .then(result =>{
          this.setData({
           catesList:result
           })
         })
   },
   //楼层
   getFloorList(){
    request({ url: "/home/floordata" })
    .then(result =>{
        this.setData({
          floorList:result
         })
       })
 },

});